<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<img id="simg" src="/static/w2/day3/images/car.png">
<p>这是美女描述</p>
<a class="link" href="#">美女1</a>
<a class="link" href="#">美女1</a>
<a class="link" href="#">美女1</a>

<button id="btn">按钮</button>

<script>
    //获取id是btn的按钮
    let btn=document.querySelector('#btn');

    //事件机制
    btn.onclick=function () {
        alert("别点我")
    }
</script>
</body>
</html>